/*
 * SimpleSetup.h
 *
 *  Created on: Mar 23, 2013
 *      Author: ohnozzy
 */

#ifndef FC_SIMPLESETUP_H_
#define FC_SIMPLESETUP_H_
#include <ompl/geometric/SimpleSetup.h>
#include "CameraMotionValidator.h"
namespace flyingcamera
{
    namespace base
    {
       class SimpleSetup: public ompl::geometric::SimpleSetup{
       public:
    	   explicit SimpleSetup(const ompl::base::StateSpacePtr &space): ompl::geometric::SimpleSetup(space){
    		   CameraMotionValidator* cmv=new CameraMotionValidator(si_.get());
    		   si_->setMotionValidator(ompl::base::MotionValidatorPtr(cmv));
    	   }
    	   SimpleSetup(const ompl::base::StateSpacePtr &space, double radian, double duration): ompl::geometric::SimpleSetup(space){
    	       		   CameraMotionValidator* cmv=new CameraMotionValidator(si_.get());
    	       		   cmv->setChangeRateRadian(radian, duration);
    	       		   si_->setMotionValidator(ompl::base::MotionValidatorPtr(cmv));
    	   }
       };
    }
}


#endif /* SIMPLESETUP_H_ */
